package com.ruoyi.system.domain;

import java.util.Date;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.core.annotation.Excel;
import com.ruoyi.common.core.web.domain.BaseEntity;

/**
 * history对象 chat_history
 * 
 * @author ruoyi
 * @date 2025-04-17
 */
public class ChatHistory extends BaseEntity
{
    private static final long serialVersionUID = 1L;

    /** 主键 */
    private Long id;

    /** 关联用户ID */
    @Excel(name = "关联用户ID")
    private String userId;

    /** 会话ID */
    @Excel(name = "会话ID")
    private String chatId;

    /** 聊天标题 */
    @Excel(name = "聊天标题")
    private String title;

    /** 会话状态（0:进行中，1:已删除） */
    @Excel(name = "会话状态", readConverterExp = "0=:进行中，1:已删除")
    private Integer status;

    /** 最后消息时间 */
    @JsonFormat(pattern = "yyyy-MM-dd")
    @Excel(name = "最后消息时间", width = 30, dateFormat = "yyyy-MM-dd")
    private Date lastMessageTime;

    public void setId(Long id) 
    {
        this.id = id;
    }

    public Long getId() 
    {
        return id;
    }
    public void setUserId(String userId) 
    {
        this.userId = userId;
    }

    public String getUserId() 
    {
        return userId;
    }
    public void setChatId(String chatId) 
    {
        this.chatId = chatId;
    }

    public String getChatId() 
    {
        return chatId;
    }
    public void setTitle(String title) 
    {
        this.title = title;
    }

    public String getTitle() 
    {
        return title;
    }
    public void setStatus(Integer status) 
    {
        this.status = status;
    }

    public Integer getStatus() 
    {
        return status;
    }
    public void setLastMessageTime(Date lastMessageTime) 
    {
        this.lastMessageTime = lastMessageTime;
    }

    public Date getLastMessageTime() 
    {
        return lastMessageTime;
    }

    @Override
    public String toString() {
        return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
            .append("id", getId())
            .append("userId", getUserId())
            .append("chatId", getChatId())
            .append("title", getTitle())
            .append("status", getStatus())
            .append("lastMessageTime", getLastMessageTime())
            .toString();
    }
}
